using System;
using System.Collections.Generic;
using TrackMe.Apps.VM;
using TrackMe.Dto;

public enum ReportPeriod
{
	Today,
	ThisWeek,
	LastWeek,
	ThisMonth,
	PriorMonth
}

public enum ReportKind
{
	TimeSheet,
	CapitalizedSalaries
}


public interface IDatabase
{
	void StopTask(int jobId);
	IJob StartTask(int taskId, string description);
	IStatMatrix LoadStats(int taskId);
	IList<ITaskForSelect> RecentTasks(int atMost);
	IList<ITaskForSelect> SearchForTask(string searchFor);
	IList<IProjectForList> ProjectList();
	IUserForList Login(string name, string guid);
	void Close();
	int SaveProject(IEditProject prj);
    int SaveTask(IEditTask model);
    IList<ITaskForList> ProjectTask(int projectId);
    IReport Report(ReportPeriod period, ReportKind kind);
	void Heartbeat(int jobId);
	IJob JobInProgress();
	IJob ResumeOrpahJob(int jobId);
	void CancelOrphanJob(int jobId);
	IList<ITfsServer> TfsServerList();
	int SaveTfsServer(ITfsServer server);
	void ImportTfsItems(int serverId, DateTime lastSyncTime, IList<ITfsWorkItem> workItems);
	int[] FindAbsentTasks(int[] ids);
	IClockOut[] PendingClockOuts();
	void ClockOutDone(int[] jobIds);
}
